<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head>
	<meta charset="utf-8">
 <link rel="icon" href="https://static.jianshukeji.com/highcharts/images/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1">	<meta name="description" content="">
	<title>包含等级的矩形树图</title>
	<script src="https://img.hcharts.cn/jquery/jquery-1.8.3.min.js"></script>
	<script src="https://img.hcharts.cn/highcharts/highcharts.js"></script>
	<script src="https://img.hcharts.cn/highcharts/modules/treemap.js"></script>
	<script src="https://img.hcharts.cn/highcharts-plugins/highcharts-zh_CN.js"></script>
</head>
<body>
<!--
*************************************************************************
    Generated by HCODE at 2017-05-05 12:26:23
    From: https://code.hcharts.cn/demos/hhhhis
*************************************************************************
-->
<div id="container"></div>

	<script>
	$(function () {
    $('#container').highcharts({
        series: [{
            type: "treemap",
            layoutAlgorithm: 'stripes',
            alternateStartingDirection: true,
            levels: [{
                level: 1,
                layoutAlgorithm: 'sliceAndDice',
                dataLabels: {
                    enabled: true,
                    align: 'left',
                    verticalAlign: 'top',
                    style: {
                        fontSize: '15px',
                        fontWeight: 'bold'
                    }
                }
            }],
            data: [{
                id: 'A',
                name: '苹果',
                color: "#EC2500"
            }, {
                id: 'B',
                name: '香蕉',
                color: "#ECE100"
            }, {
                id: 'O',
                name: '橘子',
                color: '#EC9800'
            }, {
                name: '小张',
                parent: 'A',
                value: 5
            }, {
                name: '小彭',
                parent: 'A',
                value: 3
            }, {
                name: '小潘',
                parent: 'A',
                value: 4
            }, {
                name: '小张',
                parent: 'B',
                value: 4
            }, {
                name: '小彭',
                parent: 'B',
                value: 10
            }, {
                name: '小潘',
                parent: 'B',
                value: 1
            }, {
                name: '小张',
                parent: 'O',
                value: 1
            }, {
                name: '小彭',
                parent: 'O',
                value: 3
            }, {
                name: '小潘',
                parent: 'O',
                value: 3
            }, {
                name: '阿苏',
                parent: 'wiki',
                value: 2,
                color: '#9EDE00'
            }]
        }],
        title: {
            text: '水果消费情况'
        }
    });
});
</script>

</body></html>